/*
	The Sentinel by Copy112 & Bekka
*/

local meta = FindMetaTable("Player")

-- Energy
function meta:setEnergy(a)
	-- Yes i know its lame, but we dont want to use a new NW for somthing we can use armor for.
	self:SetArmor( a )
end

function meta:addEnergy(a)
	self:setEnergy( self:getEnergy() + a )
end

function meta:removeEnergy(a)
	self:setEnergy( self:getEnergy() - a )
end

function GM:PlayerInitialSpawn( ply )
	if game.GetMap() != self.StartingMap then
		ply:Give("weapon_build")
	end
end

function GM:PlayerSpawn( ply )
	ply:Give("weapon_build")
	ply:SetMoveType(MOVETYPE_NONE)
	if game.GetMap() != self.StartingMap then
		ply:SetModel("models/hoizz_mdl/man.mdl")
		ply:PhysicsInitBox( Vector( -22, -22, 0 ), Vector( 22, 22, 68 ) )
		ply:SetCollisionBounds( Vector( -22, -22, 0 ), Vector( 22, 22, 68 ) )
		//ply:SetCollisionGroup(COLLISION_GROUP_DEBRIS)
		ply:setEnergy( 40 )
	end

end


